<?php
	class MemberCp_Form_ValidateProfile
	{
        public function validFullname($fullname)
        {
            $validator = new Zend_Validate_StringLength(1, 50);
            if($validator->isValid($fullname))
            {
                $validator = new Zend_Validate_Alpha(true);
                if($validator->isValid($fullname))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return false;
            }
        }
       
		public function validPassword($password)
		{
			$validator = new Zend_Validate_NotEmpty();
			if($validator->isValid($password))
			{
				$validator = new Zend_Validate_StringLength(6, 32);
				if($validator->isValid($password))
				{
					return true;
				}
				else
				{
					return false;
				}
			}
			else
			{
				return false;
			}
		}
        
        public function validBirthday($birthday)
        {
            $validator = new Zend_Validate_Date('dd-MM-YYYY');
            if($validator->isValid($birthday))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        
        public function validAvatar($avatar)
        {
            $validator = new Zend_Validate_NotEmpty();
			if($validator->isValid($avatar))
			{
				return true;
			}
			else
			{
				return false;
			}
        }
	}
